(function($){ $(document).ready(function(){ if(!aalInIframe()){ $("div[id*='aal_api_data']").each(function(){ var datadiv=this; var aal_divnumber=datadiv.getAttribute('data-divnumber'); var aal_target=datadiv.getAttribute('data-target'); var aal_relation=datadiv.getAttribute('data-relation'); var aal_postid=datadiv.getAttribute('data-postid'); var aal_apikey=datadiv.getAttribute('data-apikey'); var aal_clickbankid=datadiv.getAttribute('data-clickbankid'); var aal_clickbankgravity=datadiv.getAttribute('data-clickbankgravity'); var aal_notimes=datadiv.getAttribute('data-notimes'); var aal_clickbankcat=datadiv.getAttribute('data-clickbankcat'); var aal_amazonlocal=datadiv.getAttribute('data-amazonlocal'); var aal_amazonid=datadiv.getAttribute('data-amazonid'); var aal_amazoncat=datadiv.getAttribute('data-amazoncat'); var aal_amazondisplaylinks=datadiv.getAttribute('data-amazondisplaylinks'); var aal_amazondisplaywidget=datadiv.getAttribute('data-amazondisplaywidget'); var aal_amazonactive=datadiv.getAttribute('data-amazonactive'); var aal_clickbankactive=datadiv.getAttribute('data-clickbankactive'); var aal_shareasaleid=datadiv.getAttribute('data-shareasaleid'); var aal_shareasaleactive=datadiv.getAttribute('data-shareasaleactive'); var aal_cjactive=datadiv.getAttribute('data-cjactive'); var aal_ebayactive=datadiv.getAttribute('data-ebayactive'); var aal_ebayid=datadiv.getAttribute('data-ebayid'); var aal_bestbuyactive=datadiv.getAttribute('data-bestbuyactive'); var aal_bestbuyid=datadiv.getAttribute('data-bestbuyid'); var aal_walmartactive=datadiv.getAttribute('data-walmartactive'); var aal_walmartid=datadiv.getAttribute('data-walmartid'); var aal_envatoid=datadiv.getAttribute('data-envatoid'); var aal_envatosite=datadiv.getAttribute('data-envatosite'); var aal_envatoactive=datadiv.getAttribute('data-envatoactive'); var aal_rakutenactive=datadiv.getAttribute('data-rakutenactive'); var aal_rakutenid=datadiv.getAttribute('data-rakutenid'); var aal_aurl=datadiv.getAttribute('data-aurl'); var aal_excludewords=datadiv.getAttribute('data-excludewords'); var spydiv=document.getElementById('aalcontent_' + aal_divnumber); var parentdiv=spydiv.parentNode; if(parentdiv.innerHTML=='
=0;i--){ if(alinks[i].key&&alinks[i].url){ parray.unshift(alinks[i]); if(parray.length>notimes) parray.pop(); }} if(insertid&&(alinks[0]||awidgets[0])){ $.ajax({ type: "POST", url: "//autoaffiliatelinks.com/api/acache.php", data: { apikey: aalapidata.apikey, insertid: insertid, parray: parray, amazonwidget: awidgets }, cache: false, }); } aal_replacement(parray,awidgets,response,aalapidata,aal_divnumber,aal_target,aal_relation); }}); }else{ var awidgets; if(response.amazonwidget) var awidgets=response.amazonwidget; aal_replacement(parray,awidgets,response,aalapidata,aal_divnumber,aal_target,aal_relation); }} }); } function aal_replacement(parray,awidgets,response,aalapidata,aal_divnumber,aal_target,aal_relation){ var datadiv=document.getElementById('aal_api_data'); var cssclass=datadiv.getAttribute('data-cssclass'); var disclosure=datadiv.getAttribute('data-disclosure'); var spydiv=document.getElementById('aalcontent_' + aal_divnumber); var parentdiv=spydiv.parentNode; if(parentdiv.innerHTML=='

'+ text_truncate(entry.title,45) +''; awhtml +=''; }); } awhtml +=''; amazonWidget.innerHTML=awhtml; if(parray) parray.forEach(function(entry){ var re2=new RegExp("(?!(?:[^<\\[]+[>\\]]|[^>\\]]+<\/a>))\\b("+ entry.key +")\\b","i"); var re=new RegExp("(?!(?:[^<\\[]+[>\\]]|[^>\\]]+<\/a>))(?!(?:[^<\\[]+[>\\]]|[^>\\]]+<\/h.>))(?!(?:[^<\\[]+[>\\]]|[^>\\]]+<\/script.>))\\b("+ entry.key +")\\b","i"); var mat='$1' + disclosure; rt='go'; aalTree(parentdiv,re,mat); }); if(parray) parray.forEach(function(entry){ $('ul.aal_widget_holder').each(function(i, obj){ $(this).append('
  • ' + entry.key + '
  • '); }); }); var reg='/(?!(?:[^<\[]+[>\]]|[^>\]]+<\/a>))\b($name)\b/imsU'; var rep='$1' + disclosure; document.getElementById('aalcontent_' + aal_divnumber).appendChild(amazonWidget); } function aalParse(obj,strcontent){ if(obj.hasChildNodes()){ var child=obj.firstChild; while (child){ if((child.nodeType===1||child.nodeType===3)&&child.nodeName!='SCRIPT'&&child.nodeName!='A'&&child.nodeName!='IMG'&&child.nodeName[0]!='H'){ if(child.nodeType===3&&child.nodeValue!==null&&child.nodeValue.replace(/\s/g, "").length>2){ var astr=child.nodeValue; strcontent=strcontent + "." + astr; } strcontent=aalParse(child,strcontent); } child=child.nextSibling; }} return strcontent; } function aalTree(obj,re,mat){ if(obj.hasChildNodes()){ var child=obj.firstChild; var con='go'; while (child&&con=='go'){ var p=child.parentNode; if((child.nodeType===1||child.nodeType===3)&&child.nodeName!='SCRIPT'&&child.nodeName!='A'&&child.nodeName!='IMG'&&child.nodeName[0]!='H'){ if(child.nodeType===3&&child.nodeValue!==null&&child.nodeValue.replace(/\s/g, "").length>2){ var astr=child.nodeValue; var rstr=astr.replace(re,mat); if(rstr!=astr){ var newel=document.createElement('div'); newel.innerHTML=rstr; var c=newel.firstChild; while(c){ var d=c.cloneNode(true) p.insertBefore(d, child); c=c.nextSibling; } p.removeChild(child); return 'stop'; }} con=aalTree(child,re,mat); } child=child.nextSibling; }} return 'go'; } function aalInIframe (){ try { return window.self!==window.top; } catch (e){ return true; }} text_truncate=function(str, length, ending){ if(length==null){ length=100; } if(ending==null){ ending='...'; } if(str.length > length){ return str.substring(0, length - ending.length) + ending; }else{ return str; }};})(jQuery); (function(a){a.fn.superfish=function(f){var d=a.fn.superfish,e=d.c,g=a(' »'),k=function(c){var b=a(this),d=j(b);("mouseenter"===c.type||"focusin"===c.type)&&b.children("a").data("follow",!0);clearTimeout(d.sfTimer);b.showSuperfishUl().siblings().hideSuperfishUl()},l=function(c){var b=a(this),f=j(b),e=d.op,g=function(){e.retainPath=-1b.parents("li."+e.hoverClass).length&&(e.onIdle.call(),a.proxy(k, e.$path,c)())};"mouseleave"!==c.type&&"focusout"!==c.type?g():(clearTimeout(f.sfTimer),f.sfTimer=setTimeout(g,e.delay));("mouseleave"===c.type||"focusout"===c.type)&&b.children("a").data("follow",!1)},j=function(c){c.hasClass(e.menuClass)&&a.error("Superfish requires you to update to a version of hoverIntent that supports event-delegation, such as this one: https://github.com/joeldbirch/onHoverIntent");c=c.closest("."+e.menuClass)[0];d.op=d.o[c.serial];return c},m=function(c){var b=a(this),f=b.next("ul"), b=b.data("follow");if(f.length&&(d.op.useClick||!b))c.preventDefault(),f.is(":visible")?a.proxy(l,a(this).parent(),c)():a.proxy(k,a(this).parent(),c)()};return this.addClass(e.menuClass).each(function(){var c=this.serial=d.o.length,b=a.extend({},d.defaults,f),h=a(this),j=h.find("li:has(ul)");b.$path=h.find("li."+b.pathClass).slice(0,b.pathLevels).each(function(){a(this).addClass(b.hoverClass+" "+e.bcClass).filter("li:has(ul)").removeClass(b.pathClass)});d.o[c]=d.op=b;b.autoArrows&&j.children("a").each(function(){a(this).addClass(e.anchorClass).append(g.clone())}); d.op.useClick||(a.fn.hoverIntent&&!d.op.disableHI?h.hoverIntent(k,l,"li:has(ul)"):(h.on("mouseenter","li:has(ul)",k),h.on("mouseleave","li:has(ul)",l)));h.on("focusin","li:has(ul)",k);h.on("focusout","li:has(ul)",l);h.on("click","a",m);j.not("."+e.bcClass).hideSuperfishUl();b.onInit.call(this)})};var g=a.fn.superfish;g.o=[];g.op={};g.c={bcClass:"sf-breadcrumb",menuClass:"sf-js-enabled",anchorClass:"sf-with-ul",arrowClass:"sf-sub-indicator"};g.defaults={hoverClass:"sfHover",pathClass:"overideThisToUse", pathLevels:1,delay:800,animation:{opacity:"show"},animationOut:{opacity:"hide"},speed:"normal",speedOut:"fast",autoArrows:!0,disableHI:!1,useClick:!1,onInit:function(){},onBeforeShow:function(){},onShow:function(){},onHide:function(){},onIdle:function(){}};a.fn.extend({hideSuperfishUl:function(){var f=g.op,d=!0===f.retainPath?f.$path:"";f.retainPath=!1;var e=a("li."+f.hoverClass,this).add(this).not(d).find(">ul").stop(!0,!0).animate(f.animationOut,f.speedOut,function(){e=a(this);e.css("visibility", "hidden").parent().removeClass(f.hoverClass);f.onHide.call(e)});return this},showSuperfishUl:function(){var a=g.op,d=this.addClass(a.hoverClass).find(">ul:hidden").css("visibility","visible");a.onBeforeShow.call(d);d.stop(!0,!0).animate(a.animation,a.speed,function(){a.onShow.call(d)});return this}})})(jQuery); (function($){ $.fn.mobileMenu=function(options){ var defaults={ defaultText: 'Navigate to...', className: 'select-menu', subMenuClass: 'sub-menu', subMenuDash: '–' }, settings=$.extend(defaults, options), el=$(this); $("head").append('') this.each(function(){ el.find('ul').addClass(settings.subMenuClass); $('